import React, { memo } from 'react'
import { Carousel } from 'antd'

import { baseUrl } from 'services/config'

import './style.css'

export default memo(function index(props) {

  const { info } = props

  const renderBanners = () => {
    return (
      info.map((item, index) => {
        return (
          <a href=" " key={item.id}>
            <img src={`${baseUrl}${item.imgSrc}`} alt="" style={{ width: '100%', verticalAlign: 'top' }} />
          </a>
        )
      })
    )
  }

  return (
    <Carousel className="swiper" infinite>{renderBanners()}</Carousel>
  )
})
